from django.shortcuts import render
from Performance import models   # 引入创建的模型
from Performance import performance_2


def login(request):
    # if request.method == "POST":
    #     username = request.POST.get("username",None)
    #     sex = request.POST.get("sex",None)
    #     email = request.POST.get("email",None)
    #     models.index.objects.create(    #数据库插入语句
    #         u = username,   #设定字段与传入值进行对应（将会什么内容将会保存在什么字段下。）。
    #         s = sex,
    #         e = email,
    #     )
    # user_list = models.index.objects.all()     #将数据全部展示至html中。
    # return render(request,"login.html",{"user_list":user_list})
    performance_2.statistics()
    return render(request,'login.html')
